def count_file_upper(filename):
    try:
        with open(filename,'r') as f:
            content = f.read()
        count = sum(1 for word in content if word.isupper())
    except FileNotFoundError:
        count = 0
        print(f"File {filename} not found.")
    return count

if __name__ == '__main__':
    filename = 'test.txt'
    count = count_file_upper(filename)
    print(f"Number of uppercase words in {filename}: {count}")